package mock.servicesdirectory.organisations.business.businessimpl;

import java.util.List;

import mock.servicesdirectory.common.entities.Department;
import mock.servicesdirectory.organisations.business.businessinterface.DepartmentBO;
import mock.servicesdirectory.organisations.dao.daointerface.DepartmentDAO;

public class DepartmentBOImpl implements DepartmentBO{

	private DepartmentDAO departmentDAO;
	
	public DepartmentDAO getDepartmentDAO() {
		return departmentDAO;
	}

	public void setDepartmentDAO(DepartmentDAO departmentDAO) {
		this.departmentDAO = departmentDAO;
	}

	// Get all Department
	@Override
	public List<Department> getDepartment() {
		// TODO Auto-generated method stub
		return departmentDAO.getDepartment();
	}

	// Get department of an directorate
	@Override
	public List<Department> getDepartment(int directorateId) {
		// TODO Auto-generated method stub
		return departmentDAO.getDepartment(directorateId);
	}                                           

	// Filter Department via flag
	@Override
	public List<Department> getDepartment(int directorateId, int flag) {
		// TODO Auto-generated method stub
		// Method to get all directorate where name start with a flag
		/*
		 * flag = 1 . Name start with a digit 0-9
		 * flag = 2 . Name start with A, B, C, D ,E
		 * flag = 3 . Name start with F, G, H, I, J
		 * flag = 4 . Name start with K, L, M, N
		 * flag = 5 . Name start with 0, P, Q , R
		 * flag = 6 . Name start with S, T, U , V
		 * flag = 7 . Name start with W, Y, Z
		 */
		// Call DepartmentDAOImpl.getDepartment(flag)
		
		return null;
	}

	// Check exist department name
	@Override
	public boolean checkExistDepartment(String name) {
		// TODO Auto-generated method stub
		// Call DepartmentDAOImpl.checkExistDepartment(name)
		
		return false;
	}

}
